import request from '@/utils/request'

// 获取客户合同分页数据
export function getCustomerContractInfo(params) {
  return request({
    url: '/customer/page',
    method: 'get',
    params: params
  })
}

// 新增客户
export function addCustomerInfo(data) {
  return request({
    url: '/customer/add',
    method: 'post',
    data
  })
}

// 修改客户
export function updateCustomerInfo(data) {
  return request({
    url: '/customer/update',
    method: 'post',
    data
  })
}
// 查看详情
export function getCustomerInfo(customerId) {
  return request({
    url: '/customer/' + customerId,
    method: 'get'
  })
}
// 文件上传
export function importCustomerInfo(data) {
  return request({
    url: '/customer/excel',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data: data
  })
}
// 下载模版
export function downLoadTemplate(params) {
  return request({
    url: '/customer/download',
    method: 'get',
    params
  })
}

// 通用文件上传接口
export function uploadMinio(data) {
  return request({
    url: '/common/uploadMinio',
    method: 'post',
    data
  })
}
